package com.zbkj.crmeb.im.controller;

import com.alibaba.fastjson.JSONObject;
import com.common.PageParamRequest;
import com.crmeb.core.common.CommonResult;
import com.zbkj.crmeb.im.utils.ImAddressUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("api/im")
@Api(tags = "Im地址接口")
public class ImAddressController {

    @Resource
    private ImAddressUtil imAddressUtil;

    @ApiOperation(value = "地址列表接口")
    @GetMapping(value = "/address/list")
    public CommonResult<JSONObject> list(PageParamRequest request) throws Exception {
        return CommonResult.success(imAddressUtil.getAddressList(request));
    }

}
